Skip to main content

Time for a Sneak Preview

The Goggles! They do... something? 😎​

Now that we've created our new Beta User segment and set up our API to access our new product portfolio, we're ready to unveil our new Goggle lineup to our most excited users. Many of them signed up at ToggleCon and this is a highly anticipated release. Fortunately, we've done the internal testing in a separate sprint and our Beta Users are well aware that there might be some hiccups. So let's get started!

Step 1: First, we need to make sure that we are only serving the new product catalog to the right segment. Open up the new-product-experience-access flag that you created earlier.

Step 2: Create a rule that serves our Toggles and Goggles variation to the Beta Users segment and serve the Just Toggles variation to everyone else. It should look like this:

Step 3: Turn on targeting, save and review and head back to your application. Nothing has changed right? Even if you're still logged in as your Developer user, you still won't see the new catalog. It's only for beta testers! So let's opt into the program, go ahead and refresh the screen and log in. Just to show no tricks, log in with a different username, not the one you've been using for the Developers segment.

Step 4: Now let's opt into the program, hover over the button displaying your username, you should see a screen like this:

Notice the enrollment option for the Early Access Program. Go ahead and enroll and voila! Goggles!

Just to prove that it's targeting based on the enrollment, go ahead and log out, then log back in with your Developers username. No Goggles right!? Pretty cool! But how are we doing this? Well a couple of times, we've talked about context attributes, let's review contexts in a bit more depth.

Troubleshooting Steps

  • If you aren't seeing the Goggles when you opt into the Beta, double check that the API is working. Remove the rule and target everyone with the Toggles and Goggles variation.
  • If that works, make sure you've selected the proper inBeta attribute and the value is true with a bool next to it.
  • If nothing happens when you serve both Toggles and Goggles: check that you created a string flag, check the spelling on your values, check the flag key, and check the code you pasted in the products.ts file.